<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>simvoc.core.voc_sim.VOC</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="simvoc-module.html">Package&nbsp;simvoc</a> ::
        <a href="simvoc.core-module.html">Package&nbsp;core</a> ::
        <a href="simvoc.core.voc_sim-module.html">Module&nbsp;voc_sim</a> ::
        Class&nbsp;VOC
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class VOC</h1><p class="nomargin-top"><span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#VOC">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_simvoc_c_58" name="uml_class_diagram_for_simvoc_c_58">
<area shape="rect" id="node137" href="simvoc.core.voc_sim.VOC-class.html#__init__" title="x.__init__(...) initializes x; see x.__class__.__doc__ for signature" alt="" coords="17,340,428,359"/>
<area shape="rect" id="node137" href="simvoc.core.voc_sim.VOC-class.html#pilot_notify" title="Callback method invoked by the VMPilot jobs to notify the cluster that VMs &#160;have booted or are being shut down, so that the actual machines may be &#160;added to, or removed from, the cluster" alt="" coords="17,359,428,377"/>
<area shape="rect" id="node137" href="simvoc.core.voc_sim.VOC-class.html#grow" title="Expands a VOC by submitting pilot jobs to lease additional resources." alt="" coords="17,377,428,396"/>
<area shape="rect" id="node137" href="simvoc.core.voc_sim.VOC-class.html#shrink" title="Reduces the size of a VOC by stopping VMs, using the VMPilot stop() method &#160;to initiate an orderly VM shutdown (PJ_STOP signal)." alt="" coords="17,396,428,415"/>
<area shape="rect" id="node1" href="simvoc.core.voc_sim.VOC-class.html" title="Representation of the mechanism behind a Virtual Organization Cluster." alt="" coords="5,307,440,421"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#add_machine" title="Adds an *existing* machine to the cluster." alt="" coords="121,39,324,57"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#add_machines" title="Adds a list of *existing* machines to the cluster." alt="" coords="121,57,324,76"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#remove_machine" title="Removes a Machine object from the cluster, *without* removing the machine &#160;from the scheduler pool." alt="" coords="121,76,324,95"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#remove_machines" title="Removes a list of Machine objects from the clause, *without* removing them &#160;from the scheduler pool." alt="" coords="121,95,324,113"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#add_scheduler" title="Add a scheduler to the list of those known to the cluster." alt="" coords="121,113,324,132"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#remove_scheduler" title="Removes a scheduler from the list of schedulers known to the cluster." alt="" coords="121,132,324,151"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#get_scheduler" title="Returns a reference to a scheduler based on the scheduler name." alt="" coords="121,151,324,169"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#get_cpu_count" title="Returns: &#160;total number of machines in the cluster" alt="" coords="121,169,324,188"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#get_actual_idle_count" title="Returns: &#160;total number of idle machines in the cluster" alt="" coords="121,188,324,207"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#get_waiting_count" title="Returns: &#160;total number of jobs waiting on all schedulers known to the cluster" alt="" coords="121,207,324,225"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#get_running_count" title="Returns: &#160;total number of jobs running on all schedulers known to the cluster" alt="" coords="121,225,324,244"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#get_total_queue_size" title="Returns: &#160;total queue size (running+waiting) on all schedulers known to the cluster" alt="" coords="121,244,324,263"/>
<area shape="rect" id="node138" href="simvoc.core.cluster_sim.Cluster-class.html#get_completed_count" title="Returns: &#160;total number of jobs completed on all schedulers known to the cluster" alt="" coords="121,263,324,281"/>
<area shape="rect" id="node2" href="simvoc.core.cluster_sim.Cluster-class.html" title="Clusters represent collections of computing resources (Machines) and one or more schedulers (whose targets may overlap!)." alt="" coords="109,6,336,287"/>
</map>
  <img src="uml_class_diagram_for_simvoc_c_58.gif" alt='' usemap="#uml_class_diagram_for_simvoc_c_58" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Representation of the mechanism behind a Virtual Organization Cluster.
  Policies for determining when to change cluster size and from what 
  systems to lease resources for virtualization are implemented externally 
  (see the watchdog_sim module). VOCs are bona fide Clusters and have all 
  the properties and methods of Clusters, with the caveat that growing a 
  VOC requires a scheduler, site, or grid from which the required resources
  may be obtained.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.voc_sim.VOC-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">simobj</span>,
        <span class="summary-sig-arg">vo</span>,
        <span class="summary-sig-arg">img_name</span>,
        <span class="summary-sig-arg">img_src</span>,
        <span class="summary-sig-arg">ppe</span>=<span class="summary-sig-default">0.0</span>,
        <span class="summary-sig-arg">**kwds</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#VOC.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.voc_sim.VOC-class.html#pilot_notify" class="summary-sig-name">pilot_notify</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">vm</span>,
        <span class="summary-sig-arg">state</span>)</span><br />
      Callback method invoked by the VMPilot jobs to notify the cluster 
      that VMs have booted or are being shut down, so that the actual 
      machines may be added to, or removed from, the cluster</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#VOC.pilot_notify">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">list</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.voc_sim.VOC-class.html#grow" class="summary-sig-name">grow</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">count</span>,
        <span class="summary-sig-arg">submit_to</span>,
        <span class="summary-sig-arg">**kwds</span>)</span><br />
      Expands a VOC by submitting pilot jobs to lease additional resources.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#VOC.grow">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">list</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.voc_sim.VOC-class.html#shrink" class="summary-sig-name">shrink</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">count</span>,
        <span class="summary-sig-arg">kill_busy</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">sel_pilots</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br />
      Reduces the size of a VOC by stopping VMs, using the VMPilot stop() 
      method to initiate an orderly VM shutdown (PJ_STOP signal).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#VOC.shrink">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#add_machine" class="summary-sig-name">add_machine</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">machine</span>)</span><br />
      Adds an *existing* machine to the cluster.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.add_machine">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#add_machines" class="summary-sig-name">add_machines</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">machines</span>)</span><br />
      Adds a list of *existing* machines to the cluster.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.add_machines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#add_scheduler" class="summary-sig-name">add_scheduler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">sched</span>)</span><br />
      Add a scheduler to the list of those known to the cluster.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.add_scheduler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_actual_idle_count" class="summary-sig-name">get_actual_idle_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of idle machines in the cluster
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_actual_idle_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_completed_count" class="summary-sig-name">get_completed_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of jobs completed on all schedulers known to the cluster
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_completed_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_cpu_count" class="summary-sig-name">get_cpu_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of machines in the cluster
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_cpu_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_running_count" class="summary-sig-name">get_running_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of jobs running on all schedulers known to the cluster
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_running_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_scheduler" class="summary-sig-name">get_scheduler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      Returns a reference to a scheduler based on the scheduler name.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_scheduler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_total_queue_size" class="summary-sig-name">get_total_queue_size</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total queue size (running+waiting) on all schedulers known to the 
      cluster
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_total_queue_size">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_waiting_count" class="summary-sig-name">get_waiting_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of jobs waiting on all schedulers known to the cluster
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_waiting_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#remove_machine" class="summary-sig-name">remove_machine</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">machine</span>)</span><br />
      Removes a Machine object from the cluster, *without* removing the 
      machine from the scheduler pool.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.remove_machine">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#remove_machines" class="summary-sig-name">remove_machines</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">machines</span>)</span><br />
      Removes a list of Machine objects from the clause, *without* removing
      them from the scheduler pool.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.remove_machines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#remove_scheduler" class="summary-sig-name">remove_scheduler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Removes a scheduler from the list of schedulers known to the cluster.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Cluster-class.html">simvoc.core.cluster_sim.Cluster</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.remove_scheduler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">simobj</span>,
        <span class="sig-arg">vo</span>,
        <span class="sig-arg">img_name</span>,
        <span class="sig-arg">img_src</span>,
        <span class="sig-arg">ppe</span>=<span class="sig-default">0.0</span>,
        <span class="sig-arg">**kwds</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#VOC.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - Name of the VOC</li>
        <li><strong class="pname"><code>simobj</code></strong> - Reference to the simulator object</li>
        <li><strong class="pname"><code>vo</code></strong> (str) - Virtual Organization to which VOC belongs</li>
        <li><strong class="pname"><code>img_name</code></strong> (str) - Name of the VM image to be used to spawn VOC nodes</li>
        <li><strong class="pname"><code>img_src</code></strong> - FileStore on which VOC image resides</li>
        <li><strong class="pname"><code>ppe</code></strong> (float) - Probability of a random pilot job error causing a failure to 
          expand the VOC properly (0.0-1.0)</li>
        <li><strong class="pname"><code>kwds</code></strong> - Extra data for the VOC</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="pilot_notify"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">pilot_notify</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">vm</span>,
        <span class="sig-arg">state</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#VOC.pilot_notify">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Callback method invoked by the VMPilot jobs to notify the cluster that
  VMs have booted or are being shut down, so that the actual machines may 
  be added to, or removed from, the cluster</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>vm</code></strong> - VirtualMachine whose state is changed</li>
        <li><strong class="pname"><code>state</code></strong> (int) - State code (uses &quot;SC_&quot; prefixed codes in the <a 
          href="simvoc.core.core_common-module.html" 
          class="link">core_common</a> module)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="grow"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">grow</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">count</span>,
        <span class="sig-arg">submit_to</span>,
        <span class="sig-arg">**kwds</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#VOC.grow">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Expands a VOC by submitting pilot jobs to lease additional resources. 
  Unlike regular Clusters, expansion of a VOC is not instantaneous but is 
  instead asynchronous. Pilot jobs will be submitted to the scheduler, 
  site, or grid referenced in the submit_to parameter, and then a boot 
  delay will occur between the time the jobs are submitted and the time at 
  which the VMs are usable.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>count</code></strong> (int) - Number of VMs to start</li>
        <li><strong class="pname"><code>submit_to</code></strong> - Source from which VM hosting resources are to be leased (instance
          of Scheduler, Site, Grid, or any other object with an 
          add_submit_event method that permits 2 arguments: time and job)</li>
        <li><strong class="pname"><code>kwds</code></strong> - Pilot job extra data</li>
    </ul></dd>
    <dt>Returns: list</dt>
        <dd>a list of *pilot jobs* that have been created (this return type 
          differs from the base class implementation)</dd>
    <dt>Overrides:
        <a href="simvoc.core.cluster_sim.Cluster-class.html#grow">cluster_sim.Cluster.grow</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="shrink"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">shrink</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">count</span>,
        <span class="sig-arg">kill_busy</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">sel_pilots</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.voc_sim-pysrc.html#VOC.shrink">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Reduces the size of a VOC by stopping VMs, using the VMPilot stop() 
  method to initiate an orderly VM shutdown (PJ_STOP signal). If a list of 
  pilot jobs is provided (sel_pilots), then those pilot jobs will be 
  stopped first. If count is greater than the length of sel_pilots, 
  additional pilot jobs will be selected by checking for pilot jobs where 
  the virtual machine has not yet booted or where the VM is not busy. 
  Finally, if kill_busy is True, busy VMs will be terminated to reach the 
  requested count.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>count</code></strong> (int) - Number of VOC nodes to terminate</li>
        <li><strong class="pname"><code>kill_busy</code></strong> (bool) - Flag specifying whether or not busy VMs will be terminated, 
          killing any running jobs</li>
        <li><strong class="pname"><code>sel_pilots</code></strong> - Optional list of specific pilot jobs to terminate. All pilot jobs
          in the list will be terminated, without checking the length of 
          the list against the requested count parameter. Only once these 
          jobs have been terminated will any other pilot jobs be selected 
          for termination.</li>
    </ul></dd>
    <dt>Returns: list</dt>
        <dd>a list of *pilot jobs* that have been terminated (differs from 
          base class return type). Note that the length of this list may 
          differ from count if sel_pilots is longer than count, or if 
          kill_busy is False.</dd>
    <dt>Overrides:
        <a href="simvoc.core.cluster_sim.Cluster-class.html#shrink">cluster_sim.Cluster.shrink</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0 on Fri Oct 23 11:04:34 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
